<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="mall/advert/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>供应商添加</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="bankId" name="bankId"
										type="hidden">
							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>供应商名称:</label>
								<div class="col-sm-8">
									<input id="name" name="name" class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>供应商编号:</label>
								<div class="col-sm-8">
									<input id="supplycode" name="supplycode" class="form-control"
										type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">所属分类:</label>
								<div class="col-sm-4">
									<select id="pcate" name="pcate" data-placeholder=""
										class="form-control chosen-select" tabindex="2"
										onchange="onPcateChange(this)">
										<option value="" selected="selected">选择顶级分类</option>
										<option th:each="item: ${pcategorys}" th:text="${item.name}"
											th:value="${item.id}"></option>
									</select>
								</div>
								<div class="col-sm-4">
									<select id="ccate" name="ccate" data-placeholder=""
										class="form-control chosen-select" tabindex="2">
										<option value="" selected="selected">选择下级分类</option>
										<!--<option th:each="item: ${baTypes}" th:text="${item.name}" th:value="${item.typeId}"></option>-->
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>持卡人:</label>
								<div class="col-sm-8">
									<input id="linkman" name="linkman" class="form-control"
										type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label"><em
									class="gg-star">*</em>银行预留手机号码:</label>
								<div class="col-sm-8">
									<input id="mobile" name="mobile" class="form-control"
										type="text">
								</div>
							</div>


							<div class="form-group">
							<label class="col-sm-3 control-label">身份证号码:</label>
								<div class="col-sm-8">
									<input id="cardId" name="cardId" class="form-control"
										type="text">
								</div>
							</div>


							<div class="form-group">
							<label class="col-sm-3 control-label">银行:
									</label>
								<div class="col-sm-4">
									<select id="tbCode" name="tbCode" data-placeholder=""
										class="form-control chosen-select" tabindex="2">
										<option value="" selected="selected">选择主行</option>
										<option th:each="item: ${trunk}" th:text="${item.tbName}"
											th:value="${item.tbCode}"></option>
									</select>
								</div>
							</div>


							<div class="form-group">
							<label class="col-sm-3 control-label">卡号:</label>
								<div class="col-sm-8">
									<input id="cardNo" name="cardNo" class="form-control"
										type="text">
								</div>
							</div>

							<div class="form-group">
							<label class="col-sm-3 control-label">支行银联号:</label>
								<div class="col-sm-8">
									<input id="bbCode" name="bbCode" class="form-control"
										type="text" placeholder="对公必须填支行银联号">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">账户类型:</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input type="radio"
										name="isGong" value="0" /> 对私
									</label> <label class="radio-inline"> <input type="radio"
										name="isGong" value="1" /> 对公
									</label>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">联系座机:</label>
								<div class="col-sm-8">
									<input id="studio" name="studio" class="form-control"
										type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">QQ/微信:</label>
								<div class="col-sm-8">
									<input id="qq" name="qq" class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">联系地址:</label>
								<div class="col-sm-8">
									<input id="address" name="address" class="form-control"
										type="text">
								</div>
							</div>

							<!--<input type="hidden" id="centreId"  name="centreId" th:value="${centreId}" th:if="${flag} == '1'">-->
							<!--<div class="form-group" th:if="${flag} == '0'">-->
							<!--<label class="col-sm-3 control-label">商户:</label>-->
							<!--<div class="col-sm-8">-->
							<!--<select name="centreId" class="form-control" type="text">-->
							<!--<option value="" selected="selected">&#45;&#45;不限&#45;&#45;</option>-->
							<!--<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>-->
							<!--</select>-->
							<!--</div>-->
							<!--</div>-->

							<div class="form-group">
								<label class="col-sm-3 control-label">绑定会员,绑定后不能修改:</label>
								<div class="col-sm-8">
									<input id="mid" name="mid" class="form-control" type="hidden">
									<input id="username" name="username" placeholder="点击绑定会员"
										class="form-control" type="text" readonly
										onclick="relateMember()">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">关联买手:</label>
								<div class="col-sm-8">
									<input id="buymid" name="buymid" class="form-control"
										type="hidden"> <input id="buyrealnm" name="buyrealnm"
										placeholder="点击关联买手" class="form-control" type="text" readonly
										onclick="relateMember1()">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">供应商LOGO:</label>
								<div class="col-sm-6">
									<input id="picUrl" name="picUrl" class="form-control"
										type="text" onblur="onThumbBlur()">
								</div>
								<div class="col-sm-2">
									<button type="button"
										onclick="onSelectImgBtnClick('picUrl','thumbImg')"
										class="btn btn-primary">
										<i class="fa fa-check"></i>选择图片
									</button>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8">
									<label class="col-sm-5 control-label">-</label> <img
										class="img-responsive" id="thumbImg" src=""
										style="max-width: 30%">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">排序:</label>
								<div class="col-sm-8">
									<input id="displayorder" name="displayorder"
										placeholder="数字越大排序越靠前" class="form-control" type="number"
										min="0">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">类型:</label>
								<div class="col-sm-8">
									<label class="radio-inline"> <input type="radio"
										name="type" value="0" /> 第三方
									</label> <label class="radio-inline"> <input type="radio"
										name="type" value="1" checked /> 自营
									</label>
								</div>
							</div>


							<div class="form-group">
								<label class="col-sm-3 control-label">是否显示:</label>
								<div class="switch onoffswitch col-sm-1">
									<div class="onoffswitch">
										<input type="checkbox" class="onoffswitch-checkbox" value="1"
											checked="" id="isShow" name="isShow"> <label
											class="onoffswitch-label" for="isShow"> <span
											class="onoffswitch-inner"></span> <span
											class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">备注:</label>
								<div class="col-sm-8">
									<textarea id="remark" name="remark" class="form-control"></textarea>
								</div>
							</div>

							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary">
										<i class="fa fa-check"></i>提交
									</button>
									<div class="btn btn-danger" onclick="closeDow()">
										<i class="fa fa-remove"></i> 关闭
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="mall/advert/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/mall/supply/add.js">
		
	</script>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
</body>

</html>
